/**  
 * All rights Reserved, Designed By www.woniuxy.com
 * @Title:  Account.java   
 * @Package com.woniu.domain   
 * @Description:    Description  
 * @author: 蜗牛学院  
 * @date:   2019年8月29日 下午7:15:51
 * @user:   Administrator  
 * @version V1.0 
 * @Copyright: 2019 www.woniuxy.com Inc. All rights reserved. 
 * 注意：本内容仅限于成都蜗牛创想科技有限公司，禁止外泄以及用于其他的商业目
 */ 
package com.woniu.ssm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.woniu.ssm.domain.Book;
import com.woniu.ssm.util.PageBean;
import com.woniu.ssm.vo.Bookvo;
import com.woniu.ssm.vo.Queryvo;

/**
 * @author Administrator
 *
 */
public interface BookMapper {
	public int findCount(Queryvo query);
	public List<Book> findBookList(@Param("query")Queryvo query,@Param("pb")PageBean pb);
	/**
	 * @param uid
	 * @param query
	 */
	@Update("update t_book set count = count-1 where bid = #{id}")
	public void updateBorrow(int bid);
	@Insert("insert into borrow (uid,bid) values (#{userid},#{bookid})")
	public void insertBorrow(@Param("userid")int uid,@Param("bookid")int bid);
	/**
	 * @param uid
	 * @return
	 */
	public List<Bookvo> findMybook(int uid);
	/**
	 * @param bid
	 */
	public void delBook(int bid);
}
